<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>分销商管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
	$(document).ready(function() {
		$("#btnExport").click(function(){
			top.$.jBox.confirm("确认要导出数据吗？","系统提示",function(v,h,f){
				if(v=="ok"){
					$("#searchForm").attr("action","${ctx}/distribution/tDistribution/exportall?distributionId=${distributionInfo.distributionId}&userId=${distributionInfo.userId}&createTime=${createTime}");
					$("#searchForm").submit();
					$("#searchForm").attr("${ctx}/distribution/tDistribution/");
				}
			},{buttonsFocus:1});
			top.$('.jbox-body .jbox-icon').css('top','55px');
		});
	});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
		
		
		
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li ><a href="${ctx}/distribution/tDistribution/">分销列表</a></li>
		<li class="active"><a href="javascript:">查看</a></li>
	</ul>
	<form:form id="searchForm" action="${ctx}/distribution/tDistribution/"
		modelAttribute="DistributionExInfo" method="post" class="breadcrumb form-search">
		<c:if test="${distributionInfo.status eq '0'}">
		<input id="btnExport" class="btn btn-primary" type="button" value="导出"/>
		</c:if>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>结算金额</th>
				<th>¥ ${money}</th>
			</tr>
		</thead>
	</table>
	<span><label>&nbsp;&nbsp;订单明细：</label></span>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>订单号</th>
				<th>订单名称</th>
				<th>下单日期</th>
				<th>付款金额</th>
			</tr>
		</thead>
		<c:forEach items="${tOderDetail}" var="tOderDetailInfo">
			<tr>
				<td>${tOderDetailInfo.orderId}</td>
				<td>${tOderDetailInfo.orderName} </td>
				<td><fmt:formatDate value="${tOderDetailInfo.createDate}" pattern="yyyy-MM-dd" /></td>
				<td>${tOderDetailInfo.dueAmount }</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<span><label>&nbsp;&nbsp;结算信息：</label></span>
	<c:if test="${ '1' eq distributionInfo.payWay}">
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>银行卡号</th>
				<th>开户行</th>
				<th>银行账户名称</th>
			</tr>
		</thead>
			<tr>
				<td>${distributionInfo.bankCard}</td>
				<td>${distributionInfo.bankPlace}</td>
				<td>${distributionInfo.bankName}</td>
			</tr>
		</tbody>
	</table>
	</c:if>
	<c:if test="${ '0' eq distributionInfo.payWay}">
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>支付宝账号</th>
				<th>支付宝账户名称</th>
			</tr>
		</thead>
			<tr>
				<td>${distributionInfo.zfPay}</td>
				<td>${distributionInfo.zfName}</td>
			</tr>
		</tbody>
	</table>
	</c:if>
	<c:if test="${ '1' eq distributionInfo.status}">
		<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<td>打款单号</td>
				<td>${distributionInfo.remitId}</td>
			</tr>
			<tr>
				<td>结算日期</td>
				<td><fmt:formatDate value="${distributionInfo.withdrawTime}" pattern="yyyy-MM-dd" /></td>
			</tr>
		</thead>
	</table>
	</c:if>
</body>
</html>